<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleanf.org">
<head>
    <meta charset="UTF-8">
    <title>商品信息</title>
</head>
<body>
        <a href="toadd"><button>添加</button></a>
        <table border="1">
            <tr>
                <td>编号</td>
                <td>名称</td>
                <td>状态</td>
                <td>类型</td>
                <td>操作</td>
            </tr>
            <tr th:each="s:${page.list}">
                <td th:text="${s.id}">编号</td>
                <td th:text="${s.title}">名称</td>
                <td th:text="${s.state==1?'上架':'下架'}">状态</td>
                <td th:text="${s.typeName}">类型</td>
                <td>

                    <a th:href="'toupdate?id='+${s.id}">修改</a>
                    <a th:href="'delete?id='+${s.id}">删除</a>

                </td>
            </tr>

        </table>
        <a th:href="'findAll?pageNum='+${page.firstPage}">首页</a>
        <a th:href="'findAll?pageNum='+${page.prePage==0?1:page.prePage}">上一页</a>
        <a th:href="'findAll?pageNum='+${page.nextPage==page.pages?page.pages:page.nextPage}">下一页</a>

        <a th:href="'findAll?pageNum='+${page.lastPage}">尾页</a>
</body>
</html>